package com.cxh.mchat.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cxh.mchat.common.security.bean.LoginUser;
import com.cxh.mchat.user.bean.UserLoginReqBean;
import com.cxh.mchat.user.bean.UserRegisterReqBean;
import com.cxh.mchat.user.entity.User;

/**
 * <p>
 * 用户 服务类
 * </p>
 *
 * @author cxh
 * @since 2021-12-27
 */
public interface IUserService extends IService<User> {

    /**
     * 查询
     * @param userNo 账号
     * @return 用户
     */
    User selectByUserNo(String userNo);

    /**
     * 查询
     * @param email 邮箱地址
     * @return 用户
     */
    User selectByEmail(String email);

    /**
     * 注册
     * @param reqBean 请求bean
     * @return 注册结果
     */
    User register(UserRegisterReqBean reqBean);

    /**
     * 登录
     * @param reqBean 请求bean
     * @return 登录结果
     */
    LoginUser login(UserLoginReqBean reqBean);
}
